<?php

namespace console\controllers;

use yii\console\Controller;

/**
 *@auth jianbiao11
 *
 **/
class BaseController extends Controller {

	public $action_name;

	public function beforeAction($action) {
		$this->action_name = $this->getActionname();
		return parent::beforeAction($action);
	}

	protected function getActionname() {
		$controllerId = \Yii::$app->controller->id;
		$action = \Yii::$app->controller->module->requestedAction->id;
		return "$controllerId/$action";
	}

	protected function setLogInfo($message) {
		\Yii::info($message);
		//\Yii::info($this->action_name . "^" . $message);
	}

}
